import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs
defaultValue="apple-intel-plain+linux"
values={[
{label: 'macOS + Linux', value: 'apple-intel-plain+linux'},
{label: 'Homebrew', value: 'apple-intel-brew'},
{label: 'Docker', value: 'docker'},
{label: 'Windows', value: 'windows'},
{label: 'Manual Installation', value: 'manual'},
]}>
<TabItem value="apple-intel-plain+linux">

To download and install the latest release of the Atlas CLI, simply run the following in your terminal:

```shell
curl -sSf https://atlasgo.sh | sh
```

</TabItem>
<TabItem value="apple-intel-brew">

Get the latest release with [Homebrew](https://brew.sh/):

```shell
brew install ariga/tap/atlas
```

</TabItem>
<TabItem value="docker">

To pull the Atlas image and run it as a Docker container:

```shell
docker pull arigaio/atlas
docker run --rm arigaio/atlas --help
```

If the container needs access to the host network or a local directory, use the `--net=host` flag and mount the desired
directory:

```shell
docker run --rm --net=host \
  -v $(pwd)/migrations:/migrations \
  arigaio/atlas migrate apply
  --url "mysql://root:pass@:3306/test"
```

</TabItem>
<TabItem value="windows">

Download the [latest release](https://release.ariga.io/atlas/atlas-windows-amd64-latest.exe) and
move the atlas binary to a file location on your system PATH.

</TabItem>
<TabItem value="manual">

If you want to manually install the Atlas CLI, pick one of the below builds suitable for your system.

* MacOS
  * [amd64](https://release.ariga.io/atlas/atlas-darwin-amd64-latest)
* Windows
  * [amd64](https://release.ariga.io/atlas/atlas-windows-amd64-latest.exe)
* Linux
  * [amd64](https://release.ariga.io/atlas/atlas-linux-amd64-latest) / [arm64](https://release.ariga.io/atlas/atlas-linux-arm64-latest)

    _These binaries are built with `glibc version 2.31`. Some linux distributions (e.g. Ubuntu versions prior to 20.04)
    might have earlier versions of `glibc` installed, which will result in an
    `/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.31' not found` error. In that case, please use one of the
    provided `*-musl` builds._

  * [amd64-musl](https://release.ariga.io/atlas/atlas-linux-amd64-musl-latest) / [arm64-musl](https://release.ariga.io/atlas/atlas-linux-arm64-musl-latest)

</TabItem>
</Tabs>